//
//  UIImage+cate.h
//  ROL
//
//  Created by Mac on 2021/2/18.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@interface UIImage (cate)
/// 从url，初始化UIImage
/// @param url 图片资源地址
+ (nullable NSURLSessionTask *)imageWithURL:(NSString *)url block:(void(^)(UIImage *image))block;
/// 用color初始化一个image
/// @param color UIColor
+ (UIImage *)imageWithColor:(UIColor *)color;
+ (UIImage*)imageWithImage:(UIImage*)image scaledToSize:(CGSize)newSize;


/// UIImage转换成base64
- (NSString *)base64;

@end

NS_ASSUME_NONNULL_END
